#!/bin/bash
sed -i 's/^anonymous_enable=.*$//g' /etc/vsftpd/vsftpd.conf
sed -i 's#^local_root=.*$##g' /etc/vsftpd/vsftpd.conf
sed -i 's#^chroot_local_user=.*$##g' /etc/vsftpd/vsftpd.conf
sed -i 's#^allow_writeable_chroot=.*$##g' /etc/vsftpd/vsftpd.conf
echo -e 'anonymous_enable=NO\nlocal_root=/ftp#g\nchroot_local_user=YES\nallow_writeable_chroot=YES' >> /etc/vsftpd/vsftpd.conf
